import { request } from '@/utils/request';

/**
 * @description 获取table列表
 */
export function getTableListApi(data?: API.SearchParams) {
  return request({
    url: '/manage/admin/fileTemplate/pageList',
    method: 'post',
    data,
  });
}

/**
 * @description 编辑文书
 */
//
export function updateBook(data: API.UpdateBookParams) {
  return request({
    url: '/manage/admin/fileTemplate/update',
    method: 'put',
    data,
  });
}

/**
 * @description 新增文书
 */
//
export function createBook(data: API.CreateBookParams) {
  return request({
    url: '/manage/admin/fileTemplate/save',
    method: 'post',
    data,
  });
}

/**
 * @description 删除文书
 */
//
export function deleteBookApi(id?: number) {
  return request({
    url: `/manage/admin/fileTemplate/delete/${id}`,
    method: 'delete',
  });
}
